﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InputBoxSample;
using PatentApp.Models;
using PatentApp.Data;
using PatentApp.Documents;

namespace PatentApp
{
    public partial class dlgDocs : Form
    {
        public dlgDocs(string DirPath)
        {
            InitializeComponent();  
            try
            {
                DirectoryInfo Dir = new DirectoryInfo(DirPath);
                FileInfo[] FileList = Dir.GetFiles("*.*", SearchOption.AllDirectories);
                foreach (FileInfo FI in FileList)
                    ddlFiles.Items.Add(new ComboBoxItem(FI.FullName, FI.FullName));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }

        private void btnAddCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }
        private static void GetFilesFromDirectory(string DirPath)
        {

         

        }
        private void btnAddNext_Click(object sender, EventArgs e)
        {
            if (ddlFiles.Items.Count>0)
                Process.Start(((ComboBoxItem)ddlFiles.SelectedItem).Path);
        }

        public Produkt result {get; set; }

        private void lblFindCategory_Click(object sender, EventArgs e)
        {

        }

        private void ddlFindCategory_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

    }
}
